package com.bluesky.plum.uimodels.render.swing;

import com.bluesky.plum.uimodels.render.swing.components.SButton;
import com.bluesky.plum.uimodels.render.swing.components.SCheckBox;
import com.bluesky.plum.uimodels.render.swing.components.SDateTimePicker;
import com.bluesky.plum.uimodels.render.swing.components.SLabel;
import com.bluesky.plum.uimodels.render.swing.components.SListBox;
import com.bluesky.plum.uimodels.render.swing.components.SSpinBox;
import com.bluesky.plum.uimodels.render.swing.components.STextArea;
import com.bluesky.plum.uimodels.render.swing.components.STextBox;
import com.bluesky.plum.uimodels.render.swing.components.containers.SPanel;
import com.bluesky.plum.uimodels.render.swing.components.containers.layout.SGridBag;
import com.bluesky.plum.uimodels.render.swing.components.containers.layout.SHorizontalBox;
import com.bluesky.plum.uimodels.render.swing.components.containers.layout.SVerticalBox;
import com.bluesky.plum.uimodels.render.swing.components.containers.window.SDialog;
import com.bluesky.plum.uimodels.render.swing.components.containers.window.SMainWindow;
import com.bluesky.plum.uimodels.render.swing.components.menu.SMenu;
import com.bluesky.plum.uimodels.render.swing.components.menu.SMenuBar;
import com.bluesky.plum.uimodels.render.swing.components.menu.SMenuItem;
import com.bluesky.plum.uimodels.render.swing.components.table.STable;
import com.bluesky.plum.uimodels.standard.StandardUIComponentBuilder;
import com.bluesky.plum.uimodels.standard.StandardUIComponentType;
import com.bluesky.plum.uimodels.standard.components.ObjectEditor;
import com.bluesky.plum.uimodels.standard.components.containers.form.Form;

public class SwingUIComponentBuilder extends StandardUIComponentBuilder {

	@Override
	protected void register() {
		super.register();
		
		componentTypeMap.put(StandardUIComponentType.Checkbox, SCheckBox.class);
		componentTypeMap.put(StandardUIComponentType.SpinBox, SSpinBox.class);
		componentTypeMap.put(StandardUIComponentType.TextBox, STextBox.class);
		componentTypeMap.put(StandardUIComponentType.DateTimePicker,
				SDateTimePicker.class);
//		componentTypeMap.put(StandardUIComponentType.ObjectBrowser,
//				SObjectListBrowser.class);
		componentTypeMap.put(StandardUIComponentType.ObjectEditor,
				ObjectEditor.class);

		//nonfield component
		componentTypeMap.put(StandardUIComponentType.ListBox, SListBox.class);
		componentTypeMap.put(StandardUIComponentType.Table, STable.class);
		
		componentTypeMap.put(StandardUIComponentType.Label, SLabel.class);
		componentTypeMap.put(StandardUIComponentType.TextArea, STextArea.class);
		
		componentTypeMap.put(StandardUIComponentType.Button, SButton.class);
		componentTypeMap.put(StandardUIComponentType.Menu, SMenu.class);
		componentTypeMap.put(StandardUIComponentType.MenuItem, SMenuItem.class);
		componentTypeMap.put(StandardUIComponentType.MenuBar, SMenuBar.class);
		componentTypeMap.put(StandardUIComponentType.MainWindow, SMainWindow.class);
		componentTypeMap.put(StandardUIComponentType.Dialog, SDialog.class);
		componentTypeMap.put(StandardUIComponentType.Panel, SPanel.class);
		componentTypeMap.put(StandardUIComponentType.Form, Form.class);
		
		//layout
		componentTypeMap.put(StandardUIComponentType.HorizontalBox, SHorizontalBox.class);
		componentTypeMap.put(StandardUIComponentType.VerticalBox, SVerticalBox.class);
		componentTypeMap.put(StandardUIComponentType.Grid, SGridBag.class);

	}
}
